package com.personnel;

import com.personnel.sms.SendSms;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import org.springframework.web.util.HtmlUtils;

import java.util.Random;

/**
 * @Author: YuePeng
 * @Date: 2022/3/25 14:21
 * @Version: 1.0
 */
public class Editor {
    public static void main(String[] args) {

        Random random = new Random();
        String fourRandom = random.nextInt(10000) + "";
        int randLength = fourRandom.length();
        if(randLength<4){
            for(int i=1; i<=4-randLength; i++)
                fourRandom = "0" + fourRandom  ;
        }
        System.out.println(fourRandom);
    }
}
